package ch.subgate.pongwars;

public class Constants {

    public static final int MODE_PVP = 0;

    public static final int MODE_PVPN = 1;

    public static final int MODE_PVE = 2;

	public static final float BATTLEFIELD_MARGIN = 10.0f;
	
	public static final float DIC_BATTLEFIELD_WIDTH = 30.0f;
	
	public static final float DIC_BATTLEFIELD_HEIGHT = 40.0f;
	
	public static final float PLAYER_RED_YPOS = 2.0f;
	
	public static final float PLAYER_BLUE_YPOS = DIC_BATTLEFIELD_HEIGHT - 2.0f;

    public static final float MESSAGE_TOP = 15.0f;

    public static final float MESSAGE_LEFT = 2.0f;

    public static final float MESSAGE_RIGHT = 28.0f;

    public static final float MESSAGE_BOTTOM = 25.0f;

	public static final int PLAYER_RED_PADDLE_COLOR = 0xffff6600;
	
	public static final int PLAYER_BLUE_PADDLE_COLOR = 0xff00ccff;
	
	public static final String READY_TEXT = "Get Ready:";

    public static final String BLUE_WIN_TEXT = "Blue wins!";

    public static final String RED_WIN_TEXT = "Red wins!";

    public static final String REPLAY_TEXT = "Tap to play";
	
	public static final float DIRECTION_BLUE_BEGINS = -(float)Math.PI / 2.0f;
	
	public static final float DIRECTION_RED_BEGINS = (float)Math.PI / 2.0f;
	
	public static final float DIRECTION_MIN = (float)Math.PI / 4.0f;
	
	public static final float DIRECTION_MAX = (float)Math.PI / 2.0f;

    public static final float TIME_TIMEOUT = 3.0f;

    public static final int RENDER_LINE_COLOR = 0xffaaaaaa;

    /*
     * ---- Gameplay related constants ----
     * These control the basic gameplay, like speed and stuff.
     */
    public static final float FRICTION = 0.8f; // 0.8f

    public static final float BOUNCE_MIN = 10.0f; // 10.0f

    public static final float BOUNCE_MAX = 14.0f; // 14.0f

    public static final float BOUNCE_CHARGE_MAX = 5.0f; // 5.0f

    public static final float DISCHARGE_DELAY = 0.2f; // 0.2f

    public static final float SPEED_MULTIPLIER = 7.0f; // 7.0f

    public static final float SPIN_MAX = 1.5f; // 1.5f

    public static final float PADDLE_EASY = 6.0f; // 6.0f

    public static final float PADDLE_MEDIUM = 4.0f; // 4.0f

    public static final float PADDLE_HARD = 2.0f; // 2.0f

    public static final float AI_MOVE_SPEED_EASY = 20.0f; // 20.0f

    public static final float AI_MOVE_SPEED_MEDIUM = 30.0f; // 30.0f

    public static final float AI_MOVE_SPEED_HARD = 40.0f; // 40.0f

    /*
     * ---- Network messaging constants ----
     * These flags are used to identify the type of message sent and received.
     */

    /** Unique bluetooth UUID for PongWars */
    public static final String MY_UUID = "2a422f50-6668-11e4-9803-0800200c9a66";

    /** Used for status updates. The message contains data about the local player and the ball */
    public static final int FLAG_STATE = 0x00000001;

    /** Indicates that a player has performed a bounce */
    public static final int FLAG_BOUNCE = 0x00000002;

    /** Indicates that the player is ready for another match */
    public static final int FLAG_READY = 0x00000004;

    /** Indicates that a goal has been detected */
    public static final int FLAG_GOAL = 0x00000008;

    /** Indicates that a win has been detected */
    public static final int FLAG_SUPERBOUNCE = 0x00000010;

    /** Indicates that a player has quit the game */
    public static final int FLAG_QUIT = 0x00000020;

    /** Used to communicate the match terms, like paddle size */
    public static final int FLAG_INIT = 0x00000040;

    public static final float MAX_ERROR = 0.5f;

} // Constants
